class Website
  include ActiveModel::Model

  attr_accessor :title, :intro

  class << self
    def get
      title = Setting.fetch 'website_title', ''
      intro = Setting.fetch 'website_intro', ''
      Website.new title: title, intro: intro
    end
  end

  def save
    Setting[:website_title] = title
    Setting[:website_intro] = intro
  end
end